package jsyf.oa.entity.email;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import java.util.Date;

/**
 * Created by Administrator on 2017/11/23 0023.
 */
public class EmailReceiverEntity extends BaseEntity {

    private String id;
    private String emailId;
    private String userId;
    private String userName;
    private Integer userType;
    private Integer reader;
    private Date readOpenTime;
    private Date readCloseTime;
    private Date replyTime;
    private String senderId;
    private Integer eType;
    private String reportDate;
    private String dataId;
    private String subject;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getEmailId() {
        return emailId;
    }

    public void setEmailId(String emailId) {
        this.emailId = emailId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }


    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public Integer getReader() {
        return reader;
    }

    public void setReader(Integer reader) {
        this.reader = reader;
    }

    public Date getReadOpenTime() {
        return readOpenTime;
    }

    public void setReadOpenTime(Date readOpenTime) {
        this.readOpenTime = readOpenTime;
    }

    public Date getReadCloseTime() {
        return readCloseTime;
    }

    public void setReadCloseTime(Date readCloseTime) {
        this.readCloseTime = readCloseTime;
    }

    public Date getReplyTime() {
        return replyTime;
    }

    public void setReplyTime(Date replyTime) {
        this.replyTime = replyTime;
    }

    public String getSenderId() {
        return senderId;
    }

    public void setSenderId(String senderId) {
        this.senderId = senderId;
    }

    public Integer getEType() {
        return eType;
    }

    public void setEType(Integer eType) {
        this.eType = eType;
    }

    public String getReportDate() {
        return reportDate;
    }

    public void setReportDate(String reportDate) {
        this.reportDate = reportDate;
    }

    public String getDataId() {
        return dataId;
    }

    public void setDataId(String dataId) {
        this.dataId = dataId;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("EMAIL_ID", getEmailId());
        obj.put("USER_ID", getUserId());
        obj.put("USER_NAME", getUserName());
        obj.put("USER_TYPE", getUserType());
        obj.put("READER", getReader());
        obj.put("READ_OPEN_TIME",getReadOpenTime());
        obj.put("READ_CLOSE_TIME",getReadCloseTime());
        obj.put("REPLY_TIME",this.getReplyTime());
        obj.put("SENDER_ID",this.getSenderId());
        obj.put("E_TYPE",this.getEType());
        obj.put("REPORT_DATE",this.getReportDate());
        obj.put("DATA_ID",this.getDataId());
        obj.put("SUBJECT",this.getSubject());
        return obj;
    }

    public JSONObject getJSONObjectId() {
        JSONObject obj = new JSONObject();
        obj.put("id", getId());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_SYS_EMAIL_RECEIVER";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("EMAIL_ID", "emailId");
        obj.put("USER_ID", "userId");
        obj.put("USER_NAME", "userName");
        obj.put("USER_TYPE", "userType");
        obj.put("READER", "reader");
        obj.put("READ_OPEN_TIME","readOpenTime");
        obj.put("READ_CLOSE_TIME","readCloseTime");
        obj.put("REPLY_TIME","replyTime");
        obj.put("SENDER_ID","senderId");
        obj.put("E_TYPE","eType");
        obj.put("REPORT_DATE","reportDate");
        obj.put("DATA_ID","dataId");
        obj.put("SUBJECT","subject");
        return obj;
    }
}
